package com.shqcjd.sinopecdemomobile.ui.adapter;

import android.support.annotation.Nullable;
import android.view.View;
import android.widget.TextView;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.shqcjd.sinopecdemomobile.R;
import com.shqcjd.sinopecdemomobile.model.pojo.GuideListBean;

import java.util.List;

import butterknife.BindView;
import butterknife.ButterKnife;

/**
 * 远程指导记录
 * Created by sy on 2019/3/22.
 */

public class RemoteGuideHistoryAdapter extends BaseQuickAdapter<GuideListBean.ItemsBean,RemoteGuideHistoryAdapter.ViewHolder> {

    public RemoteGuideHistoryAdapter(@Nullable List<GuideListBean.ItemsBean> data) {
        super(R.layout.item_guide_history, data);
    }

    @Override
    protected void convert(RemoteGuideHistoryAdapter.ViewHolder helper, GuideListBean.ItemsBean item) {
        helper.tv_name.setText("发起人: "+item.userName+"   专家: "+item.expertName);
        helper.tv_task_code.setText("任务号:"+item.flightsTaskId);
        helper.tv_kks.setText("设备:"+item.kks);
        helper.tv_time.setText("巡检时间: "+item.taskTime);
    }

    class ViewHolder extends BaseViewHolder {
        @BindView(R.id.tv_name)
        TextView tv_name;
        @BindView(R.id.tv_task_code)
        TextView tv_task_code;
        @BindView(R.id.tv_kks)
        TextView tv_kks;
        @BindView(R.id.tv_time)
        TextView tv_time;
        @BindView(R.id.tv_view_file)
        TextView tv_view_file;
        public ViewHolder(View view) {
            super(view);
            ButterKnife.bind(this, view);
        }
    }
}